{subtemplate header}

<div id="subheader">
	<div class="wrap">
		<div id="sh_body">
			<div id="welcome">
				<p class="userstatus">
				<!--{if !$discuz_uid}-->
					{lang home_welcome_guest}
				<!--{else}-->
					{lang home_welcome} {$discuz_userss}, <!--{if $lastvisit > 0}-->{lang home_lastvisit} {$lastvisit}, <!--{/if}--><a href="search.php?srchfrom=$newthreads&amp;searchsubmit=yes" class="radius5">{lang show_newthreads}</a>, <a href="member.php?action=markread" id="ajax_markread" onclick="ajaxmenu(event, this.id)" class="radius5">{lang mark_read}</a>
				<!--{/if}-->
				</p>
				<p class="sitestats">
					{lang index_today}: <strong>$todayposts</strong>, 
					{lang index_yesterday}: <strong>$postdata[0]</strong><!--{if  $detailstatus && $whosonlinestatus}-->
					, {lang onlinemember}: <strong>$onlinenum</strong>
					<!--{/if}-->
				</p>
			</div>
		</div>
		<div id="sh_side">
			<div class="postbtn">
				<a href="misc.php?action=nav" onclick="floatwin('open_nav', this.href, 600, 410);return false;"><em><span>{lang post_newthread}</span></em></a>
			</div>
		</div>
	</div>
</div>

<!--{if empty($gid) && $announcements}-->
<div id="ann">
	<div class="wrap">
		<a href="#" class="more">MORE</a>
		<dl>
			<dt class="label_c"><strong>{lang announcement}</strong></dt>
			<dd>
				<ul id="annbodylis">$announcements</ul>
			</dd>
		</dl>
	</div>
</div>
<!--{/if}-->

<div id="wrap" class="wrap s_clear">
	<div class="main">
		<div class="content">


<!--{if $admode && empty($insenz['hardadstatus']) && !empty($advlist['text'])}--><div class="ad_text" id="ad_text"><table summary="Text Ad" cellpadding="0" cellspacing="1">$advlist[text]</table></div><!--{else}--><div id="ad_text"></div><!--{/if}-->

<!--{eval $rkey=array_rand($catlist);}-->
<!--{loop $catlist $key $cat}-->
	<!--{if $cat['forumscount']}-->
		<div class="mainbox list">
			<h3><a href="$indexname?gid=$cat[fid]">$cat[name]</a></h3>
			<table id="category_$cat[fid]" summary="category$cat[fid]" cellspacing="0" cellpadding="0">
				<!--{if !$cat['forumcolumns']}-->
				<!--{loop $cat[forums] $forumid}-->
					<!--{eval $forum=$forumlist[$forumid];}-->
					<tbody id="forum$forum[fid]">
						<tr$forum[folder]>
							<td class="forumicon"><!--{if $forum[icon]}-->$forum[icon]<!--{else}--><a href="forumdisplay.php?fid=$forum[fid]"><img src="http://t.douban.com/spic/s2767937.jpg" alt="" /></a><!--{/if}--></td>
							<th>
								<h2><a href="forumdisplay.php?fid=$forum[fid]" {if $forum[redirect]}target="_blank"{/if}>$forum[name]</a><!--{if $forum[todayposts] && !$forum['redirect']}--><em> ({lang index_today}: <strong>$forum[todayposts]</strong>)</em><!--{/if}--></h2>
								<!--{if $forum[description]}--><p>$forum[description]</p><!--{/if}-->
							</th>
							<td class="forumlast">
							<!--{if $forum['permission'] == 1}-->
								{lang private_forum}
							<!--{else}-->
								<!--{if $forum['redirect']}-->
									<a href="forumdisplay.php?fid=$forum[fid]">{lang url_link}</a>
								<!--{elseif is_array($forum['lastpost'])}-->
									<cite><!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->{lang anonymous}<!--{/if}--> - $forum[lastpost][dateline]</cite>
								<!--{else}-->
									{lang never}
								<!--{/if}-->
							<!--{/if}-->
							</td>
							<td class="forumnums">
								<!--{if $forum['redirect']}-->-<!--{else}--><em>$forum[threads]</em><!--{/if}-->
							</td>
						</tr>
					</tbody>
				<!--{/loop}-->
				<!--{elseif $cat['forumcolumns'] == 99}-->
				<tr>
					<td style="border: none;">
					<style>
						.mixforum { padding-left: 60px; }
							.mixforum .forumicon { margin-left: -60px; }
							.mixforum .headforum { margin-bottom: 10px; }
							.mixforum .subforum { list-style: inside disc; color: #999; }
								.mixforum .new { color: #4DA400; }
								.mixforum li em { font-weight: normal; color: #999; }
					</style>
					<ul class="mixforum">
					<!--{loop $cat[forums] $forumid}-->
						<!--{eval $forum=$forumlist[$forumid];}-->
						<!--{if $forum['orderid'] == 0}-->
							<li class="headforum $forum[folder]">
							<div class="forumicon"><!--{if $forum[icon]}-->$forum[icon]<!--{else}--><a href="forumdisplay.php?fid=$forum[fid]"><img src="http://t.douban.com/spic/s2767937.jpg" alt="" /></a><!--{/if}--></div>
							<h2><a href="forumdisplay.php?fid=$forum[fid]" {if $forum[redirect]}target="_blank"{/if}>$forum[name]</a><!--{if !$forum['redirect']}--><em> ({lang thread}: $forum[threads]<!--{if $forum[todayposts] && !$forum['redirect']}-->, {lang index_today}: $forum[todayposts]<!--{/if}-->)</em><!--{/if}--></h2>
							<!--{if $forum[description]}--><p>$forum[description]</p><!--{/if}-->
							</li>
						<!--{else}-->
							<li class="subforum $forum[folder]"><a href="forumdisplay.php?fid=$forum[fid]" {if $forum[redirect]}target="_blank"{/if}>$forum[name]</a><!--{if !$forum['redirect']}--><em> ({lang thread}: $forum[threads]<!--{if $forum[todayposts] && !$forum['redirect']}-->, {lang index_today}: $forum[todayposts]<!--{/if}-->)</em><!--{/if}--></li>
						<!--{/if}-->
					<!--{/loop}-->
					</ul>
					</td>
				</tr>
				<!--{else}-->
					<tr class="narrowlist">
					<!--{loop $cat['forums'] $forumid}-->
						<!--{eval $forum=$forumlist[$forumid];}-->
						<!--{if $forum['orderid'] && ($forum['orderid'] % $cat['forumcolumns'] == 0)}-->
							</tr></tbody>
							<!--{if $forum['orderid'] < $cat['forumscount']}-->
								<tbody><tr>
							<!--{/if}-->
						<!--{/if}-->
						<th width="$cat[forumcolwidth]"{$forum[folder]}>
							<h2><a href="forumdisplay.php?fid=$forum[fid]" {if $forum[redirect]}target="_blank"{/if}>$forum[name]</a><!--{if $forum[todayposts]}--><em> ({lang index_today}: <strong>$forum[todayposts]</strong>)</em><!--{/if}--></h2>
							<!--{if !$forum[redirect]}-->
								<p>{lang forum_threads}: $forum[threads], {lang forum_posts}: $forum[posts]</p>
								<!--{if $forum['permission'] == 1}-->
									<p>{lang private_forum}
								<!--{else}-->
									<p>{lang forum_lastpost}:
										<!--{if is_array($forum['lastpost'])}-->
											<a href="redirect.php?tid=$forum[lastpost][tid]&amp;goto=lastpost#lastpost" title="{echo cutstr($forum[lastpost][subject], 30)} {lang forum_lastpost_by} {if $forum['lastpost']['author']}$forum['lastpost']['authorusername']{else}{lang anonymous}{/if}  ">$forum[lastpost][dateline]</a>
										<!--{else}-->
											{lang never}
										<!--{/if}-->
									</p>
								<!--{/if}-->
							<!--{else}-->
								<p>{lang url_link}</p>
							<!--{/if}-->
						</th>
					<!--{/loop}-->
					$cat['endrows']
				<!--{/if}-->
			</table>
		</div>
		<!--{if $admode && empty($insenz['hardadstatus']) && !empty($advlist['intercat']) && ($advlist['intercat'][$key] = array_merge(($advlist['intercat'][0] ? $advlist['intercat'][0] : array()), ($advlist['intercat'][$key] ? $advlist['intercat'][$key] : array())))}--><div class="ad_column" id="ad_intercat_$key"><!--{echo $advitems[$advlist['intercat'][$key][array_rand($advlist['intercat'][$key])]]}--></div><!--{else}--><div id="ad_intercat_$key"></div><!--{/if}-->
	<!--{/if}-->
<!--{/loop}-->

</div></div>

<div id="sidebar" class="side">
	
	<div id="forumstats" class="sidebox">
		<h4>{lang stats}</h4>
		<ul>
			<li>{lang thread}: <em>$threads</em></li>
			<li>{lang posts}: <em>$posts</em></li>
			<li>{lang index_members}: <em>$totalmembers</em></li>
		</ul>
	</div>
	<hr />
	<!--{if empty($gid)}-->
		{eval request($infosidestatus, 0, 2);}
	<!--{else}-->
		{eval request($infosidestatus, 1, 2);}
	<!--{/if}-->
	<hr />
	<div class="sidebox">
		<h4>{lang link}</h4>
		<ul>
			<!--{if $discuz_uid && $adminid > 1}--><li><a href="modcp.php?fid=$fid" target="_blank">{lang modcp}</a></li><!--{/if}-->
			<!--{if $discuz_uid && $adminid == 1}--><li><a href="admincp.php" target="_blank">{lang admincp}</a></li><!--{/if}-->
			<li><a href="http://www.mixfog.com/blog/" target="_blank">Mixfog</a></li>
			<!--{if $_DCACHE['forumlinks'][2]}-->
			$_DCACHE['forumlinks'][2]
			<!--{/if}-->
		</ul>
	</div>
</div>

{subtemplate footer}